Skip to content

internal: (studio) do not record events if cloud studio is enabled #31858

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 13, 2025

Conversation

astone123
Copy link
Contributor

Additional details

For this ticket, we're moving all of the AUT event listener logic over to the cloud studio side. This PR updates the app so that if we're in cloud studio mode, we don't add the event listeners for current studio, since that would result in duplicate event listeners being added.

See related Cloud PR https://github.com/cypress-io/cypress-services/pull/10939

Steps to test

Test the cloud PR and make sure that when running with current studio you can still record commands

How has the user experience changed?

Both studio experiences should remain the same from a user's perspective.

PR Tasks

  • Have tests been added/updated?

@astone123 astone123 self-assigned this Jun 10, 2025
@@ -853,7 +864,7 @@ export const useStudioStore = defineStore('studioRecorder', {
return $el.hasClass('__cypress-studio-assertions-menu')
},

_openAssertionsMenu (event) {
_openAssertionsMenu (event, addAssertion?: ($el: HTMLElement | JQuery<HTMLElement>, ...args: AssertionArgs) => void) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adding the ability to pass in addAssertion here allows us to control assertion recording from the cloud without having to move the whole assertion menu UI over - see the other PR for how we hook into this

Copy link

cypress bot commented Jun 10, 2025

cypress    Run #63043

Run Properties:  status check passed Passed #63043  •  git commit 6ea0d41bd6: Merge branch 'develop' into studio-cloud-listeners
Project cypress
Branch Review studio-cloud-listeners
Run status status check passed Passed #63043
Run duration 19m 29s
Commit git commit 6ea0d41bd6: Merge branch 'develop' into studio-cloud-listeners
Committer astone123
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 16
Tests that did not run due to a developer annotating a test with .skip  Pending 1232
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 32183
View all changes introduced in this branch ↗︎
UI Coverage  45.56%
  Untested elements 191  
  Tested elements 164  
Accessibility  92.74%
  Failed rules  3 critical   9 serious   2 moderate   2 minor
  Failed elements 695  

@@ -269,6 +269,8 @@ useSubscription({ query: StudioStatus_ChangeDocument }, (_, data) => {
})

const cloudStudioRequested = computed(() => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool! I think I need this for cy.prompt actually.

@astone123 astone123 merged commit a1edbce into develop Jun 13, 2025
89 of 91 checks passed
@astone123 astone123 deleted the studio-cloud-listeners branch June 13, 2025 15:34
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jun 17, 2025

Released in 14.5.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v14.5.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Jun 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants